Flags
QuickDraw GX provides two sets of flags in the transfer mode structure that control certain aspects of the transfer mode operation. One set operates on individual color components; the other set operates on the source or destination color as a whole, taking into account all of the components.Transfer Component Flags
The transfer component flags are a set of flags in thegxTransferComponent
structure (in thecomponent
field of the transfer mode structure) that alter the source, destination, or result value for an individual color component. There are two constants for these flags, defined in thegxComponentFlags
enumeration:Specifying gxOverResultComponent allows the result of transfers using
gxAddMode
to wrap around (from 0xFFFF to 0x0000) instead of remaining clamped at 0xFFFF.Specifying gxReverseComponent allows you to apply a transfer mode backwards--from the destination to the source--for a particular component. It is most useful for component modes that depend on order, like
gxMigrateMode
, orgxAddMode
when used for subtraction.Transfer Mode Flags
The transfer mode flags are a set of flags in theflags
field of the transfer mode structure. They affect how color limits are used and whether a single component mode is to be used for all color components. There are three values for the flags, defined in thegxTransferFlags
enumeration:Setting the
gxRejectSourceTransfer
orgxRejectDeviceTransfer
flag causes an inversion of the acceptable color ranges for source or destination color, respectively. For example, in Figure 5-14 on page 5-30, setting thegxRejectSourceTransfer
orgxRejectDeviceTransfer
flag would cause the white (empty) portions of the large cubes that represent RGB space to be within range, instead of the gray (filled) portions.The effect is similar to, although not exactly the same as, individually reversing the minimum and maximum values for the color components. If the transfer mode flag is cleared, drawing occurs only when all components are inside the allowed ranges--that is, inside the darker gray portions of the large cubes in Figure 5-14. With the flag set, drawing occurs any time at least one component is outside of its allowed range--that is, with values anywhere outside of the dark gray areas in Figure 5-14.
The
gxSingleComponentTransfer
flag is provided as a convenience. You can set
the flag when you don't need the flexibility (and extra effort) of specifying different transfer modes for different color components. In this case you need set up only onegxTransferComponent
structure, instead of one for each component in the transfer mode's color space.